package org.example.springoauth2.resourceserver2.controller;

import org.example.springoauth2.securitycommon.config.Inner;
import org.springframework.web.bind.annotation.*;

/**
 * @author hzq
 * @date 2021/10/11 9:25
 */
@Inner(false)
@RestController
@RequestMapping("/ig")
public class IgnoredController {

    @RequestMapping(value = "/ignored1", method = {RequestMethod.GET, RequestMethod.POST})
    public String ignored1() {
        return "ignored1";
    }

    @RequestMapping("/ignored2")
    public String ignored2() {
        return "ignored2";
    }

    /**
     * 内部调用或者需要认证
     */
    @Inner
    @GetMapping("/ignored3")
    public String ignored3() {
        return "ignored3";
    }

    @GetMapping("/ignored4/{ignored4}")
    public String ignored4(@PathVariable String ignored4) {
        return ignored4;
    }
}
